<div class="container-fluid">
    <div class="row-fluid">
        <div class="span3"><?php echo $this->partial('choix/menu.phtml', array('num_vente' => $this->num_vente)) ?></div>
        <div class="span9">
            <div class="wrap">
                <div id="main-content">
                    <table>
                    	<thead>
                    		<tr>
                    			<th>Prénom &amp; Nom</th>
                    			<th>Editer</th>
                    			<th>Supprimer</th>
                    		</tr>
                    	</thead>
                    	<tbody>
                    	<?php foreach($this->users as $rs) :?>
                    		<tr>
                    			<td style="text-align:left"><?php echo stripslashes($rs['prenom']) ." ". stripslashes($rs['nom']) ?></td>
                    			<td><a href="<?php echo $this->baseUrl() ?>/admin/choix/add-ventes-user?id=<?php echo $rs['p_admin']?>&num_ventes=<?php echo $this->num_vente;?>"><img src="<?php echo $this->baseUrl()?>/images/pencil.png"></a></td>
                    			<td><a href="javascript:void(0)" id="<?php echo $this->num_vente;?>" class="delete"><img src="<?php echo $this->baseUrl()?>/images/cross.png"></a></td>
                    	<?php endforeach;?>
                    	</tbody>
                    </table> 
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
$(document).ready(function(){
    $('.delete').click(function(){
        if (confirm("Etes-vous sûr de vouloir effacer?")) {
            var baseUrl = '<?php echo $this->baseUrl()?>';
            var id = $(this).attr('id');
            var page = '<?php echo $this->page ?>';
            document.location.href = baseUrl + '/admin/choix/delete-admin/id/'+ id +'/page/'+ page;
        }
    });
});
</script>